pub mod atomic;
pub mod internal;
pub mod types;
pub mod track;

/* 
todo! - add complier support for following func
*/
#[macro_export]
macro_rules! mi_cdecl {
    () => {}
}
#[macro_export]
macro_rules! mi_decl_export  {
    () => {}
}
#[macro_export]
macro_rules! mi_decl_restrict  {
    () => {}
}
#[macro_export]
macro_rules! mi_attr_malloc {
    () => {}
}
#[macro_export]
macro_rules! mi_attr_alloc_size {
    ($s: expr) => {}
}
#[macro_export]
macro_rules! mi_attr_alloc_size2 {
    ($s1: expr, $s2: expr) => {}
}
#[macro_export]
macro_rules! mi_attr_alloc_align{
    ($p: expr) => {}
}
// todo! - add prim for different platforms

// todo! - add more interface for ddiffernt platforms
#[macro_export]
macro_rules! malloc {
    ($n:expr) => {
        mi_malloc($n)
    };
}

#[macro_export]
macro_rules! calloc {
    ($n:expr, $c:expr) => {
        mi_calloc($n, $c)
    };
}

#[macro_export]
macro_rules! realloc {
    ($p:expr, $n:expr) => {
        mi_realloc($p, $n)
    };
}

#[macro_export]
macro_rules! free {
    ($p:expr) => {
        mi_free($p)
    };
}

#[macro_export]
macro_rules! strdup {
    ($s:expr) => {
        mi_strdup($s)
    };
}

#[macro_export]
macro_rules! strndup {
    ($s:expr, $n:expr) => {
        mi_strndup($s, $n)
    };
}

#[macro_export]
macro_rules! realpath {
    ($f:expr, $n:expr) => {
        mi_realpath($f, $n)
    };
}


pub type MiArenaId = i32;

pub const MI_SMALL_SIZE_MAX: usize = 128;
pub const MI_SMALL_WSIZE_MAX: usize = 128;